<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改设备管理')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-equipment-edit" th:object="${equipment}">
            <input name="bianhao" th:field="*{bianhao}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">领用单位：</label>
                <div class="col-sm-8">
                    <input name="lingyong" th:field="*{lingyong}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">仪器名称：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">分类号：</label>
                <div class="col-sm-8">
                    <input name="fenleihao" th:field="*{fenleihao}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">型号：</label>
                <div class="col-sm-8">
                    <input name="xinghao" th:field="*{xinghao}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">规格：</label>
                <div class="col-sm-8">
                    <input name="guige" th:field="*{guige}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">单价：</label>
                <div class="col-sm-8">
                    <input name="danjai" th:field="*{danjai}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">厂家：</label>
                <div class="col-sm-8">
                    <input name="changjia" th:field="*{changjia}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">购置日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="gouzhiriqi" th:value="${#dates.format(equipment.gouzhiriqi, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">现状：</label>
                <div class="col-sm-8">
                    <input name="xianzhunag" th:field="*{xianzhunag}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">经费科目：</label>
                <div class="col-sm-8">
                    <input name="jingfeikemu" th:field="*{jingfeikemu}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">使用方向：</label>
                <div class="col-sm-8">
                    <input name="shiyongfangxinag" th:field="*{shiyongfangxinag}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">设备来源：</label>
                <div class="col-sm-8">
                    <input name="laiyuan" th:field="*{laiyuan}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">领用人：</label>
                <div class="col-sm-8">
                    <input name="lingyongren" th:field="*{lingyongren}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">经手人：</label>
                <div class="col-sm-8">
                    <input name="jingshouren" th:field="*{jingshouren}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">记帐人：</label>
                <div class="col-sm-8">
                    <input name="jizhangren" th:field="*{jizhangren}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">输入人：</label>
                <div class="col-sm-8">
                    <input name="shururen" th:field="*{shururen}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">入库时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="rukushijian" th:value="${#dates.format(equipment.rukushijian, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">单据号：</label>
                <div class="col-sm-8">
                    <input name="danjuhao" th:field="*{danjuhao}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">存放地名称：</label>
                <div class="col-sm-8">
                    <input name="cunfangdi" th:field="*{cunfangdi}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="beizhu" th:field="*{beizhu}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "equipment/equipment";
        $("#form-equipment-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-equipment-edit').serialize());
            }
        }

        $("input[name='gouzhiriqi']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='rukushijian']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>